let formItem = [
  {
    decorator: "code",
    label: "编号",
    required: true
  },
  {
    decorator: "name",
    label: "标题",
    required: true
  },
  {
    decorator: "num",
    label: "数量"
  },
  {
    decorator: "type",
    label: "类型",
    type: "selection",
    required: true,
    options: [
      {
        label: "立减券",
        value: '1'
      },
      {
        label: "满减券",
        value: '2'
      }
    ]
  },
  {
    decorator: "recommend",
    label: "是否推荐",
    type: "selection",
    options: [
      {
        label: "是",
        value: '0'
      },
      {
        label: "否",
        value: '1'
      }
    ]
  },
  {
    decorator: "categoryId",
    label: "商品类别",
    scopedSlots: { customRender: "categorySlots" }
  },
  {
    decorator: "orderAmount",
    label: "满足金额"
  },
  {
    decorator: "subAmount",
    label: "满减金额"
  },
  {
    decorator: "startDate",
    label: "开始时间",
    required: true,
    type: "date",
    disabledDate(current) {
      // 今天周几，从1开始到7
      // let week = moment().format("E");
      // let monday = moment().add(7 - week, "d");
      // let sunday = moment().add(7 + (7 - week), "d");
      // return (
      //   current &&
      //   (current < monday.endOf("day") || current > sunday.endOf("day"))
      // );
    },
  },
  {
    decorator: "endDate",
    label: "结束时间",
    required: true,
    type: "date",
    disabledDate(current) {
      // 今天周几，从1开始到7
      // let week = moment().format("E");
      // let monday = moment().add(7 - week, "d");
      // let sunday = moment().add(7 + (7 - week), "d");
      // return (
      //   current &&
      //   (current < monday.endOf("day") || current > sunday.endOf("day"))
      // );
    },
  },
  {
    decorator: "remark",
    label: "备注"
  },
  {
    decorator: "stat",
    label: "状态",
    type: "radio",
    options: [
      {
        label: "待启用",
        value: "0"
      },
      {
        label: "启用",
        value: "1"
      }
    ]
  },
  {
    decorator: "createTime",
    label: "创建时间",
    type: "date",
  },



];

export default formItem;
